package com.jy.adscm.operation.mask.bean;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jy.adscm.operation.cg.bean.CgMaterial;
import com.jy.adscm.operation.cg.bean.CgSupplier;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author zyl
 * @since 2020-03-24
 */
public class KzMaterial implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /*物料id*/
    private Integer material;
    /*物料信息*/
    @TableField(exist = false)
    private CgMaterial cgMaterial;
    /*供应商id*/
    private Integer supplier;
    /*供应商信息*/
    @TableField(exist = false)
    private CgSupplier cgSupplier;
    /*条码*/
    private String code;
    /*批号*/
    private String batch;
    /*入库时间*/
    private Date inStockDate;
    /*入库人*/
    private String inStocker;
    @TableField(exist = false)
    private String inStockerName;
    /*备注*/
    private String remark;
    /**
     * 重量
     */
    private Float weight;
    /*创建时间*/
    private Date createTime;
    /*数量*/
    private Integer  nums;
    private  Float  length;

    public Float getLength() {
        return length;
    }

    public void setLength(Float length) {
        this.length = length;
    }

    public Integer getNums() {
        return nums;
    }

    public void setNums(Integer nums) {
        this.nums = nums;
    }

    public String getInStockerName() {
        return inStockerName;
    }

    public void setInStockerName(String inStockerName) {
        this.inStockerName = inStockerName;
    }

    public CgMaterial getCgMaterial() {
        return cgMaterial;
    }

    public void setCgMaterial(CgMaterial cgMaterial) {
        this.cgMaterial = cgMaterial;
    }

    public CgSupplier getCgSupplier() {
        return cgSupplier;
    }

    public void setCgSupplier(CgSupplier cgSupplier) {
        this.cgSupplier = cgSupplier;
    }

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getCreateTime() {
        return createTime;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getMaterial() {
        return material;
    }

    public void setMaterial(Integer material) {
        this.material = material;
    }

    public Integer getSupplier() {
        return supplier;
    }

    public void setSupplier(Integer supplier) {
        this.supplier = supplier;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getBatch() {
        return batch;
    }

    public void setBatch(String batch) {
        this.batch = batch;
    }
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getInStockDate() {
        return inStockDate;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd")
    public void setInStockDate(Date inStockDate) {
        this.inStockDate = inStockDate;
    }

    public String getInStocker() {
        return inStocker;
    }

    public void setInStocker(String inStocker) {
        this.inStocker = inStocker;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Float getWeight() {
        return weight;
    }

    public void setWeight(Float weight) {
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "KzMaterial{" +
        "id=" + id +
        ", material=" + material +
        ", supplier=" + supplier +
        ", code=" + code +
        ", batch=" + batch +
        ", inStockDate=" + inStockDate +
        ", inStocker=" + inStocker +
        ", remark=" + remark +
        ", weight=" + weight +
        "}";
    }
}
